<h2>Listing forms</h2>

		<div id="instruction">
			"Application Forms" are the forms used to create grant applications every year. 
			 <ul>
			 	<br />
			 	<li>To review an application form, click "Show" in the "Actions" column.</li>
				<li>To change an existing application form, use the "Edit" feature</li>
			 </ul>
			 <ul>
				<li>A <u>Cycle</u> is a period of time when people can apply for and win a new grant. 
					Click "New Cycle" to begin the process of opening up grant opportunities</li>
	
				
			 </ul>
		</div>
		

<table>
  <tr>
		<th>Name</th>
		<th>Owner</th>
		<th>Created On</th>
		<th>Updated On</th>
		<th>Actions</th>
  </tr>
  
<% for form in @forms %>
  <tr>
  	<td><%= form.name %></td>
    <td>
			<%= link_to form.owner.display_name, :controller => "account", :action => "show", :id => form.owner %>
		</td>
  	<td><%= form.created_at.strftime("%m-%d-%Y") %></td>
  	<td><%= form.updated_at.strftime("%m-%d-%Y") %></td>
    <td>
			<%= link_to 'Show', :action => 'show', :id => form %>
    	<%= link_to 'Edit', :action => 'edit', :id => form %>
    	<%= link_to 'New Cycle', { :controller => 'cycle', :action => 'new', :id => form } %>
		</td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @form_pages.current.previous } if @form_pages.current.previous %>
<%= link_to 'Next page', { :page => @form_pages.current.next } if @form_pages.current.next %> 

<br />

<%= link_to 'New form', :action => 'new' %>
